﻿<UserControl x:Class="TestApp.Tabs.PersonSample"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:tree="clr-namespace:Aga.Controls.Tree;assembly=Aga.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>

        <tree:TreeList Name="_tree">
            <tree:TreeList.View>
                <GridView>
                    <GridView.Columns>

                        <GridViewColumn Width="400" Header="Name">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <tree:RowExpander/>
                                        <TextBlock Text="{Binding Name}"></TextBlock>
                                    </StackPanel>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>

                        <GridViewColumn Header="Id" Width="50" DisplayMemberBinding="{Binding Id}"/>


                    </GridView.Columns>
                </GridView>
            </tree:TreeList.View>
        </tree:TreeList>
        <Button Grid.Row="1" Content="Button" Click="Button_Click"/>

    </Grid>
</UserControl>
